package com.iad.entity;
import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.GeneratedValue;


import static javax.persistence.GenerationType.IDENTITY;

@Entity
@Table(name = "page")
public class Page implements java.io.Serializable {
  private Long id;
  private String name;
  private String title;
  private String content;
  private Long siteId;

  public Page() {
  }

  public Page(Long id, String name, String content) {
    this.id = id;
    this.name = name;
    this.content = content;
  }

  @Id
  @GeneratedValue(strategy = IDENTITY)
  @Column(name = "id", unique = true, nullable = false)
  public Long getId() {
    return this.id;
  }

  public void setId(Long id) {
    this.id = id;
  }

  @Column(name = "name", nullable = false, length = 80)
  public String getName() {
    return this.name;
  }

  public void setName(String name) {
    this.name = name;
  }
  
  @Column(name = "title", nullable = false, length = 80)
  public String getTitle() {
    return this.title;
  }

  public void setTitle(String title) {
    this.title = title;
  }
  
  @Column(name = "content", nullable = true)
  public String getContent() {
    return this.content;
  }

  public void setContent(String content) {
    this.content = content;
  }
  
  @Column(name = "site_id", unique = false, nullable = false)
  public Long getSiteId() {
    return this.siteId;
  }

  public void setSiteId(Long siteId) {
    this.siteId = siteId;
  }
  
}
